<template>
    <div>
        <div v-for="(p,i) in list" :key="i" @click="qq(p)" style="display:flex;align-items: center;padding:2%;border-bottom: 1px black solid;">
            <img :src="p.imgUrl" style="width:15%;border-radius:50%"/>
            <div style="margin-left:5%">{{p.nickName}}</div>
        </div>
    </div>
</template>

<script>
import axios from 'axios'
import {mapState} from 'vuex'
export default {
    data(){
        return{
            list:[]
        }
    },
    computed:{
        ...mapState({
            token:state=>state.user.token
        }),
        
    },
    created(){
      axios({
          url:"/ajax/user",
          method:'POST',
          data:{
            token:this.token,
          }
      }).then(({data})=>{
          this.list=data.data
      }).catch(err=>{
        console.log(err)
      })
    },
    methods:{
        qq(p){
            this.$router.push({name:'see',params:{obj:p}})
        }
    }
}
</script>

<style lang='scss' soped>

</style>